package com.company;

/**
 * Created by ruoan on 2020/9/23 16:16
 */
public class ShopsImpl implements Shops{
    private static Dog dog;
     {
        dog=new Dog();
     }

    public Dog getDog() {
        return dog;
    }
    @Override
    public void sale() {
        dog.eat();
        System.out.println("sale方法");
    }

    public static void main(String[] args) {
        new ShopsImpl().sale();

        System.out.println(new ShopsImpl().getDog());
        System.out.println(new ShopsImpl().getDog());
    }
}
